<template>
  <div class="app" style="border: 3px solid #000; margin: 10px">
    我是父APP组件 
    <!-- ! 1.给子组件以添加属性的方式传值 -->
    <Son :title="myTitle" @fnChange="changeTitle"></Son>
    <Son :alt="myAlt"></Son>
  </div>
</template>

<script>
import Son from './components/Son.vue'
export default {
  name: 'App',
  data() {
    return {
      myTitle: '学前端，就来黑马程序员',
      myAlt:'hello,黑马'
    }
  },
  components: {
    Son,
  },
  methods:{
    changeTitle(value){
      this.myTitle = value
    },
    
  }
}
</script>

<style>
</style>